<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>求两个数的最大数</title>
</head>

<body>
    <SCript>
        var a = 6;
        var b = 7;
        //第一种
        var maxNumber;
        var maxNumber = a;
        if (a < b) {
            maxNumber = b;
        } else {
            maxNumber = a;
        }
        console.log(maxNumber);
        //第二种
        var maxNumber = a;
        if (a < b) {
            maxNumber = b;
        }
        console.log(maxNumber);
    </SCript>
</body>

</html>